package util;

import android.view.View;

/**
 * Created by guangdye on 2014/11/10.
 */
public class ViewUtil {

    public static boolean isChildView(View child, View parent){

        View tmpView = child;
        if(tmpView ==null)
            return false;

        do{

            if(tmpView ==parent)
                return true;

            tmpView = (View)tmpView.getParent();

        }
        while(tmpView !=null);

        return false;

    }
}
